import Vue from 'vue'

export const mutations = {
  clearUser ($state) {
    Vue.set($state, 'user', {})
  },

  clearToken ($state) {
    Vue.set($state, 'token', '')
  },

  setToken ($state, token) {
    $state.token = token
  },

  setRole ($state, role) {
    $state.role = role
  },

  setUser ($state, user) {
    $state.user = user
  }
}
